import 'package:dio/dio.dart';
import 'package:nyh_motorcade_app/config/config.dart';
import 'package:nyh_motorcade_app/utils/sp_utils.dart';


class HeaderInterceptors extends InterceptorsWrapper {
  @override
  Future<void> onRequest(RequestOptions options, RequestInterceptorHandler handler) async {
    String token = await SPUtils.getString(SPUtils.TOKEN);
    options.headers["accessToken"] = token;
    options.headers["systemType"] = Config.systemType;
    super.onRequest(options, handler);
  }
}
